<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>


    <div id="app">
    <!--1.vue变量获取-->
    {{msg}}
    <!--2.使用全局组件-->
    <global_component></global_component>
    <global_component></global_component>
    <global_component></global_component>
    </div>

    <script>
        //1.定义全局组件,参数1:组件名字, 参数2:组件内容
        Vue.component(
            'global_component',
            {
                template:"<h1>隔壁老王在练腰</h1>"
            }
        )
        //2.创建vue对象,管理页面
        var vue = new Vue({
            el:"#app",
            data:{
                msg:"hello vue"
            }
        })

    </script>

</body>
</html>